package com.example.design.facade;

/**
 * 客户端
 */
public class Client {
    public static void main(String[] args) {
        //初始化所有子系统
        DVDPlayer dvd = new DVDPlayer();
        Projector projector = new Projector();
        SoundSystem soundSystem = new SoundSystem();
        Lights lights = new Lights();

        // 使用门面类
        HomeTheaterFacade homeTheater = new HomeTheaterFacade(dvd, projector, soundSystem, lights);
        homeTheater.watchMovie();
        System.out.println();

        homeTheater.endMovie();
    }
}
